/**
 * Object for product showing 
 */
var SHOW_PRODUCT  = {
    /**
     * Show product job initialization
     */
    init: function() {
        $("a#products-link").fancybox({
            'hideOnContentClick': true,
            'showCloseButton': true,
            'autoDimensions': false,
            'height': 200,
            'width': 310
        });

        $('#products-link').click(function() {
            SHOW_PRODUCT.appendSelectedProductsToShoppingCart();
        });
    },
    /**
     * Add selected products to shopping cart
     */
    appendSelectedProductsToShoppingCart: function() {
        var ulShopping = $('#shopping-list').empty(); 
        var a_SelectedProdcuts = FOUR_CLICS.a_getSelectedProduct();
        jQuery.each(a_SelectedProdcuts,function(i_key, o_ProductAxis) {
            var $o_li = jQuery("<li>").html(o_ProductAxis.o_Product.name).addClass("selected-product");
            ulShopping.append($o_li);          
        });
    }
}
